import SwiftUI
import AppIntents
import CalendarShared

public struct MediumWeekView: View {
    public let entry: MediumEntry
    public let todyIntent: (any AppIntent)?
    public let lastIntent: (any AppIntent)?
    public let nextIntent: (any AppIntent)?
    @Environment(\.colorScheme) var colorScheme

    public init(entry: MediumEntry, todyIntent: (any AppIntent)? = nil, lastIntent: (any AppIntent)? = nil, nextIntent: (any AppIntent)? = nil) {
        self.entry = entry
        self.todyIntent = todyIntent
        self.lastIntent = lastIntent
        self.nextIntent = nextIntent
    }

    public var body: some View {
        WeekView(entry: entry, todyIntent: todyIntent, lastIntent: lastIntent, nextIntent: nextIntent)
        .widgetBackground(entry.background.color(colorScheme))
    }

}
